package protomysql

import (
	"gitee.com/crack007/goose/gslog"
	"gitee.com/crack007/proxy/src/constant"
	"gitee.com/crack007/proxy/src/proxy/protocol/protomysql/stmt"
)

type StmtPrepare struct {
}

func (s *StmtPrepare) Process(mysql *Mysql) {
	gslog.Debug("[%s] StmtPrepare", mysql.GetSessionId())
	mysql.MysqlClient.Stmt = stmt.NewMysqlSTMT(mysql.MysqlClient.mysqlPackage.PayloadStream.ReadRestOfPacketString())
	mysql.MysqlServer.ChangePrepareState(constant.STMT_STATE_PREPARE)
}
